﻿<%@ include file="/WEB-INF/views/framework/global.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<% 
	String updateMessage = (String)request.getParameter("updateMessage");
	if(updateMessage==null || updateMessage.equals("null")){
		updateMessage = "";
	}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>开题报告</title>
</head>
<body class="kk">
	<ul class="nav nav-tabs g_navbar">
		<li><a href="${reqRoot}">我的报告</a></li>
		<li class="active"><a href="#">报告编辑</a></li>
	</ul>
	<div class="framework_container">
		<c:if test="${report.status!= 'SUBMIT'}">
		<div class="row">
			<div class="col-md-1"></div>
			<div class="col-md-10">
			    <%=updateMessage %>
				<form:form modelAttribute="uploadItem" class="form-horizontal"
					action="${reqRoot}/update" name="frm" method="post"
					enctype="multipart/form-data">
					<input type="hidden" id="id" name="id" value="${report.id}" />
					<div class="form-group">
						<label class="col-md-2 control-label" for="name">报告名称</label>
						<div class="col-md-10">
							<input type="text" class="form-control" id="exampleInputEmail1"
								name="name" placeholder="报告名称" value="${report.name}">
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label" for="content">报告内容</label>
						<div class="col-md-10">
							<textarea id="editor_id" name="content"
								style="width: 100%; height: 250px;">${report.content}</textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label" for="image">附件上传</label>
						<div class="col-md-10">
							<div class="mb5"><form:input path="fileData" id="image" type="file" /></div>
							<div>允许上传的文件格式：${fileExt}，大小：${fileSize}</div>
						</div>
						<%-- 上传错误信息
							<%=updateMessage %>
						--%>
					</div>
					<div class="form-group tc">
						<button type="submit" class="btn btn-success mr20" id="submit">保存</button>
					</div>
				</form:form>
			</div>
			<div class="col-md-1"></div>
		</div>
		</c:if>
		<c:if test="${report.status=='SUBMIT'}">
			<div class="framework_container mytopic">
			<section class="persion_tip">
				<a class="abs create_report" href="${reqRoot}"><h2 class="fw">您的报告已提交</h2></a>
			</section>
		</div> 
		</c:if>
	</div>
	<!-- /framework_container -->
	<script charset="utf-8"
		src="${path}/static/lib/kindeditor-4.1.10/kindeditor.js"></script>
	<script charset="utf-8"
		src="${path}/static/lib/kindeditor-4.1.10/lang/zh_CN.js"></script>
	<script src="${cmpRoot}/report_update.js"></script>
</body>
</html>
